		
<template>
  <PullToRefresh :onRefresh="handleRefresh">
    <div v-for="item in items" :key="item.id">{{ item.text }}</div>
  </PullToRefresh>
</template>

<script setup lang="ts">
import PullToRefresh from './components/xialashuax.vue';
import { ref } from 'vue';

const items = ref([{ id: 1, text: 'Item 1' }, { id: 2, text: 'Item 2' }, { id: 3, text: 'Item 3' }]);

const handleRefresh = (done: () => void) => {
  console.log(done, 55555);

  // 模拟刷新数据的异步操作
  setTimeout(() => {
    items.value = [/* 更新数据 */];
    done(); // 调用 done 函数通知下拉刷新组件刷新完成
  }, 1000);
};
</script>